home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / misc / adhelp10.lha / ADHelp10 / rexx / ADHelp.ged < prev    next >
Encoding:
Text File  |  1994-06-11  |  1.4 KB  |  68 lines

  1. /* $VER: 1.0, ©1993 Klaus Wissmann. ARexx-Script for GoldED & ADHelp */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT'                              /* lock GUI, gain access   */
  9. OPTIONS FAILAT 6                            /* ignore warnings         */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  11.  
  12.  
  13. /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
  14.  
  15. QUERY COLUMN var Spalte
  16. Spalte=Spalte-1
  17.  
  18. QUERY BUFFER var Zeile
  19.  
  20. ADDRESS ADHELP 
  21.  
  22. Help BYTEOFFS Spalte STRING Zeile
  23. erg=result
  24.  
  25. if rc>0 then
  26. erg="TEXT ADHelp: needed argument missing!"
  27.  
  28. ADDRESS
  29.  
  30. if left(erg,5)="TEXT " then
  31. do
  32.         erg=delstr(erg,1,5)
  33.         'FIX VAR ERG'
  34.         'REQUEST TITLE "ADHelp" BUTTON "OK" BODY "' || erg || '"'
  35. end 
  36. else
  37. if left(erg,5)="FILE " then
  38. do
  39.         erg=delstr(erg,1,5)
  40.         OPEN erg NEW
  41. end
  42. else
  43. if left(erg,7)="SELECT " then
  44. do
  45.         erg=delstr(erg,1,7)
  46.         OPEN erg NEW
  47. end
  48. else
  49. if left(erg,7)="INCLUDE " then
  50. do
  51.         erg=delstr(erg,1,8)
  52.         byteoffs=word(erg,1)
  53.         erg=delword(erg,1,1)
  54.         OPEN erg NEW
  55.         GOTO BYTE byteoffs
  56. end
  57.  
  58. /* ---------------------------- END OF YOUR CODE --------------------- */
  59.  
  60. 'UNLOCK' /* VERY important: unlock GUI */
  61. EXIT
  62.  
  63. SYNTAX:
  64.  
  65. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  66. 'UNLOCK'
  67. EXIT
  68.